{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "import numpy as np\n",
    "import matplotlib.pyplot as plt\n",
    "\n",
    "def f(x):\n",
    "    return np.sin(x) + 0.5*x\n",
    "\n",
    "x = np.linspace(-2*np.pi,2*np.pi,50)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Text(0, 0.5, 'f(x)')"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAEKCAYAAAD0Luk/AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAgAElEQVR4nO3df7zX8/3/8dujUujENnH8CLGoyM+TzY/8aBj7YcbnoxmLTMI0PwqhJUN+TKmtTIXGRk62/IiKaU5+f5byM2UyiSxFaB2iTj2+fzxO35r14/x6vZ/v93nfr5fL+3LU+/R63V91vB7v54/X82nujoiIFKcmqQOIiEg6KgIiIkVMRUBEpIipCIiIFDEVARGRItYsdYDaaN26tbdt2zaTY3/22We0bNkyk2PngvKnV+jXUOj5ofCvIav8M2bM+Mjdt17XewVVBNq2bcv06dMzOfbUqVM54ogjMjl2Lih/eoV+DYWeHwr/GrLKb2bz1veeuoNERIqYioCISBFTERARKWIqAiIiRUxFQESkiKkIiIgUMRUBEZEipiIgIpLn7rkH7r4bslj5X0VARCSPffYZ9O0LY8aAWcMfv6CeGBYRKTYjRsDChXD//dkcP2lLwMyamNnjZvammf3DzI5JmUdEJJ8sWQI33gjf/z4cfHA250jdHeTAae6+O3ABMChxHhGRvDF0KHzyCVx9dXbnSNod5LHB8YLqX+4MvJIwjohI3li8GG6+GU48EcrKsjuP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ERARKWIqAiIiRUxFQESkiKkIiIgUMRUBkQZgZvtVrzs1JnUWkdrQcwIiDcDMxgET3P2e1FlEakMtAZGGsQ3/uZqoSEFQERCpJzMbDhwIlJvZL1LnEakNdQeJNAAzmwr8yt2fSZ1FpDbUEhARKWIqAiIiRUxFQESkiKkIiIgUMQ0Mi4gUMbUERESKmIqAiEgRUxEQESliKgIiIkVMRUBEpIipCIiIFDEVARGRIqYiICJSxP4fVvC4KNnRuNoAAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(x,f(x),'b')\n",
    "plt.grid(True)\n",
    "plt.xlabel('f')\n",
    "plt.ylabel('f(x)')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([-5.47508597e-05,  6.29207435e-19,  4.99394999e-03, -3.27841038e-17,\n",
       "       -1.35368487e-01,  3.68516585e-16,  1.41870278e+00, -6.07977093e-16])"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "reg = np.polyfit(x,f(x),deg = 7)\n",
    "reg"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [],
   "source": [
    "ry = np.polyval(reg,x)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Text(0, 0.5, 'y')"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAEKCAYAAAD0Luk/AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6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ASGEcGNSBIQQwo1JERBCCDcmRUAIIdyYFAEhhHBj/weqocLgelj4/gAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(x,f(x),'b',label='f(x)')\n",
    "plt.plot(x,ry,'r',label='regression')\n",
    "plt.legend(loc=0)\n",
    "plt.grid(True)\n",
    "plt.xlabel('x')\n",
    "plt.ylabel('y')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [],
   "source": [
    "matrix = np.zeros((3 + 1,len(x)))\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "matrix[3,:] = x ** 3\n",
    "matrix[2,:] = x ** 2\n",
    "matrix[1,:] = x \n",
    "matrix[0,:] = 1\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [],
   "source": [
    "reg = np.linalg.lstsq(matrix.T,f(x),rcond=-1)[0]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "array([ 1.47064660e-14,  5.62777448e-01, -1.11022302e-15, -5.43553615e-03])"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "reg"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Text(0, 0.5, 'f(x)')"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAEKCAYAAAD0Luk/AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2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d+BmYFIAGAtAWOMCWvWEjDGmDBmScAYY8KYJQFjjAljlgSMMSaMWRIwxpgwZknAGGPCmCUBY4wJY5YEjDEmjFkSMMaYMGZJwJhccM71cc4NT/9zB+fcJ17HZEx2WNkIY3LBOVcELfzVCpgG/F/65jLGhARrCRiTC+k70PVGdxT7yBKACTWWBIzJvaNAMQK0J6wxvmTdQcbkgnOuGLAYuBvdlOVqEdnpbVTGZJ21BIzJnX7AZBH5HRgFDPA4HmOyxVoCxhgTxqwlYIwxYcySgDHGhDFLAsYYE8YsCRhjTBizJGCMMWHMkoAxxoQxSwLGGBPGLAkYY0wY+3/+WXlGKrro4gAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "ry=np.dot(reg,matrix)\n",
    "plt.plot(x,f(x),'b',label='f(x)')\n",
    "plt.plot(x,ry,'r',label='regression')\n",
    "plt.legend(loc=0)\n",
    "plt.grid(True)\n",
    "plt.xlabel('x')\n",
    "plt.ylabel('f(x)')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [],
   "source": [
    "xu = np.random.rand(50)*4*np.pi - 2 * np.pi"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Text(0, 0.5, 'f(x)')"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAYEAAAEKCAYAAAD0Luk/AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjMsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy+AADFEAAAgAElEQVR4nO3de3zcdb3n8dcn6SUmLYW2UC5pkm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fAAAACQSURBVBkOrRMQyQIzewB41N3jQdciMhzqCYhkx2H03UlUJBQUAiIjZGYrgNOBtWZ2adD1iAyHTgeJZIGZbQBucPeNQdciMhzqCYiIRJhCQEQkwhQCIiIRphAQEYkwDQyLiESYegIiIhGmEBARiTCFgIhIhCkEREQiTCEgIhJhCgERkQhTCIiIRJhCQEQkwv4/mGpyC2hxSO0AAAAASUVORK5CYII=\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "yu = f(xu)\n",
    "\n",
    "reg = np.polyfit(xu,yu,deg = 7)\n",
    "ry = np.polyval(reg,xu)\n",
    "\n",
    "plt.plot(xu,yu,'b^',label='f(x)')\n",
    "plt.plot(xu,ry,'ro',label='regression')\n",
    "plt.legend(loc=0)\n",
    "\n",
    "plt.grid(True)\n",
    "plt.xlabel('f')\n",
    "plt.ylabel('f(x)')\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
